<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div class="one">
    <p>hello <strong>GouGe</strong></p>
  </div>

  <input type="text" value="123">

  <script src="./jquery-3.6.0.js"></script>

  <script>
    // 1. html() ------------------ innerHTML ----------------------------
    // $('div').html() --- 获取div里面的html内容
    // $('div').html('<span>sdsdsdds</span>') --- 设置div里面的html内容

    // let h = $('div').html();
    // console.log(h); // <p>hello <strong>GouGe</strong></p>

    // $('div').html('<span>hello world</span>');


    // 2. text() -------------------- innerText --------------------------
    // console.log($('div').text()); // hello GouGe
    // $('div').text('好好');


    // 3. val() --------------------- value ----------------------------
    // 处理value属性值
    console.log($('input').val());
    $('input').val('456')
  </script>

</body>

</html>